<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Cipaganti Travel</title>
		<style>
			body{
				margin-left : 1cm;
				margin-top : 1cm;
				font-size : 12px;
			}
			#judul{
				text-decoration:underline;
				font-size: 18px !important;
				font-weight: bold;
				text-align:center;
			}

			#batas_bawah {
				height : 1px;
				background-color: black;
				width: 100%;
				float: left;
			}

			#kode_biaya{
				font-size: smaller;
				width: 70px;
				text-align: right;
			}

			.border_bawah{
				border-bottom: 1px solid black;	
			}

			.sign{
				font-weight: bold;
			}
			.right{
				text-align: right;
			}
			.left{
				text-align: left;
			}
			.label_sub_judul{
				text-align: left;
				margin-left: 120px;
			}

		</style>
	</head>

	<body>
		<table width="395" border="0">
			<tr>
				<td height="55" colspan="3"><div id="judul">BUKTI SETORAN OP AWAL</div></td>
			</tr>
			<tr>
				<td><div class="label_sub_judul">TANGGAL </div></td>
				<td colspan="2">: <?php echo $biaya_awal[0]['tgl_pembayaran'] ?></td>
			</tr>
			<tr>
				<td><div class="label_sub_judul">NOMOR </div></td>
				<td colspan="2">: <?php echo $nospj ?></td>
			</tr>
			<tr>
				<td colspan="3">&nbsp;</td>
			</tr>
			<tr>
				<td width="165">TANGGAL SPJ</td>
				<td width="220">: <?php echo $reservasi['TGLSPJ'] ?></td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>NO. POLISI</td>
				<td>: <?php echo $reservasi['NoPol'] ?></td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>NAMA DRIVER</td>
				<td>: <?php echo $reservasi['Driver'] ?></td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>RUTE</td>
				<td colspan="2">: <?php echo $reservasi['Asal'] ?> - <?php echo $reservasi['Tujuan'] ?></td>
			</tr>
                        <tr>
				<td>Jumlah Kapasitas</td>
				<td colspan="2">: <?php echo $jumlah_seat['JumlahKursi'] ?></td>
			</tr>
                        <tr>
				<td>Jumlah Tiket</td>
				<td colspan="2">: <?php echo $jumlah_penumpang['PesanKursi'] ?></td>
			</tr>                        
			<tr>
				<td height="32" colspan="3"><hr id="batas_bawah"/></td>
			</tr>
			<tr>
				<td>PENJUALAN KOTOR</td>
				<td colspan="2">: Rp. <?php echo number_format($subtotal['SubTotal'], 2, ',', '.') ?></td>
			</tr>
			<tr>
				<td>POTONGAN/DISCOUNT</td>
				<td colspan="2">: Rp. <?php echo number_format($discount['Discount'], 2, ',', '.') ?></td>
			</tr>                  			
			<tr>
				<td>&nbsp;</td>
				<td><hr/></td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td><div align="right">PENJUALAN BERSIH&nbsp;&nbsp;</div></td>
				<td colspan="2">: Rp. <?php echo number_format(($subtotal['SubTotal'] - $discount['Discount']), 2, ',', '.') ?></td>
			</tr>
			<tr>
				<td colspan="3">&nbsp;</td>
			</tr>
			<tr>
				<td>BIAYA</td>
				<td colspan="2">&nbsp;</td>
			</tr>			
			<tr>
				<td>PERPAL</td>
				<td>: Rp. <?php echo number_format($biaya_awal[0]['jumlah'], 2, ',', '.') ?></td>
				<td><span id="kode_biaya">(<?php echo $biaya_awal[0]['kode_coa_biaya'] ?>)</span></td>
			</tr>
                        <?php if(count($spbu_voucher)>0){ ?>
                        <tr>
				<td>SPBU</td>
				<td>: <?php echo $spbu_voucher['nama'] ?></td>
			</tr>
                        <tr>
				<td>Voucher BBM</td>
				<td>: <?php echo $spbu_voucher['kode_voucher'] ?></td>
			</tr>
                        <tr>
				<td>Jenis BBM</td>
				<td>: <?php echo $spbu_voucher['jenis_bbm'] ?></td>
			</tr>
                        <tr>
				<td>Jumlah Liter</td>
				<td>: <?php echo $spbu_voucher['jumlah_liter'] ?> Liter</td>
			</tr>
                        <tr>
				<td>Jumlah Biaya</td>
				<td>: Rp. <?php echo number_format($spbu_voucher['jumlah_uang'], 2, ',', '.') ?></td>
			</tr>
                        <?php }
                        else{?>
			<tr>
				<td>BBM</td>
				<td>: Rp. <?php echo number_format($biaya_awal[1]['jumlah'], 2, ',', '.') ?></td>
				<td><span id="kode_biaya">(<?php echo $biaya_awal[1]['kode_coa_biaya'] ?>)</span></td>
			</tr>
                        <?php  }?>
			<tr>
				<td>PARKIR, TOL</td>
				<td>: Rp. <?php echo number_format($biaya_awal[2]['jumlah'], 2, ',', '.') ?></td>
				<td><span id="kode_biaya">(<?php echo $biaya_awal[2]['kode_coa_biaya'] ?>)</span></td>
			</tr>
			<tr>
				<td>FERRY PENYEBRANGAN</td>
				<td>: Rp. <?php echo number_format($biaya_awal[3]['jumlah'], 2, ',', '.') ?></td>
				<td><span id="kode_biaya">(<?php echo $biaya_awal[3]['kode_coa_biaya'] ?>)</span></td>
			</tr>
			<tr>
				<td>MAKAN PENUMPANG</td>
				<td>: Rp. <?php echo number_format($biaya_awal[4]['jumlah'], 2, ',', '.') ?></td>
				<td><span id="kode_biaya">(<?php echo $biaya_awal[4]['kode_coa_biaya'] ?>)</span></td>
			</tr>
			<tr>
				<td>SNACK PENUMPANG</td>
				<td>: Rp. <?php echo number_format($biaya_awal[5]['jumlah'], 2, ',', '.') ?></td>
				<td><span id="kode_biaya">(<?php echo $biaya_awal[5]['kode_coa_biaya'] ?>)</span></td>
			</tr>
			<tr>
				<td>KOORDINASI LAPANGAN</td>
				<td>: Rp. <?php echo number_format($biaya_awal[6]['jumlah'], 2, ',', '.') ?></td>
				<td><span id="kode_biaya">(<?php echo $biaya_awal[6]['kode_coa_biaya'] ?>)</span></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td><hr/></td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td><div align="right">TOTAL BIAYA &nbsp;&nbsp;</div></td>
                                
                                <?php $total_biaya = 0 ?>
                                <?php for($i=0;$i<7;$i++) {?>
                                <?php $total_biaya +=  $biaya_awal[$i]['jumlah']?>
                                <?php } ?>
				<td colspan="2">: Rp. <?php echo number_format($total_biaya, 2, ',', '.') ?></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td><hr/></td>
				<td>&nbsp;</td>
			</tr>	
                    <tr>
				<td><div align="right">TOTAL SETOR &nbsp;&nbsp;</div></td>
				<td colspan="2">: Rp. <?php echo number_format(($subtotal['SubTotal'] - $discount['Discount'])-$total_biaya, 2, ',', '.') ?></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td><hr/></td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td colspan="3">&nbsp;</td>
			</tr>
			<tr>
				<td class="sign left" height="97">
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DRIVER
					<br/>
					<br/>
					<br/>
					<br/>
					(<?php echo $reservasi['Driver']?>)
				</td>
				<td class="sign right">
					KASIR/CSO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<br/>
					<br/>
					<br/>
					<br/>
					(<?php echo $this->session->userdata('nama')?>)
				</td>
			</tr>  
		</table>
		<script>
			window.print();
		</script>	
	</body>
</html>